using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Tracker.Data.DataTransfer
{
	/// <summary>
	/// Object data transfer definition for the 'ObjectAttribute' table
	/// </summary>
	[Serializable]
	[DataContract]
	public partial class ObjectAttribute : Tracker.Data.EFDAL.Interfaces.Entity.IObjectAttribute, Tracker.Data.EFDAL.Interfaces.IDTO
	{
		#region Constructors

		/// <summary>
		/// The default contructor for the ObjectAttribute DTO
		/// </summary>
		public ObjectAttribute()
		{
		}

		#endregion

		#region Object Properties

		/// <summary>
		/// The AttributeName field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("AttributeName")]
		public virtual string AttributeName { get; set; }

		/// <summary>
		/// The AttributeType field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("AttributeType")]
		public virtual string AttributeType { get; set; }

		/// <summary>
		/// The ID field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("ID")]
		[System.ComponentModel.DataAnnotations.Key()]
		[System.ComponentModel.ReadOnly(true)]
		public virtual int ID { get; set; }

		/// <summary>
		/// The ObjectName field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("ObjectName")]
		public virtual string ObjectName { get; set; }

		/// <summary>
		/// The CreatedDate field
		/// </summary>
		[DataMember]
		public virtual DateTime? CreatedDate { get; set; }

		/// <summary>
		/// The CreatedBy field
		/// </summary>
		[DataMember]
		public virtual string CreatedBy { get; set; }

		/// <summary>
		/// The ModifiedDate field
		/// </summary>
		[DataMember]
		public virtual DateTime? ModifiedDate { get; set; }

		/// <summary>
		/// The ModifiedBy field
		/// </summary>
		[DataMember]
		public virtual string ModifiedBy { get; set; }


		#endregion

		#region Navigation Properties

		/// <summary>
		/// The relation ObjectAttribute -> ObjectData
		/// </summary>
		[DataMember]
		public virtual ICollection<Tracker.Data.EFDAL.Interfaces.Entity.IObjectData> ObjectDataList { get; set; }

		#region Clone

		/// <summary>
		/// Creates a shallow copy of this object of all simple properties
		/// </summary>
		/// <returns></returns>
		public virtual object Clone()
		{
			var newItem = new ObjectAttribute();
			newItem.AttributeName = this.AttributeName;
			newItem.AttributeType = this.AttributeType;
			newItem.ID = this.ID;
			newItem.ObjectName = this.ObjectName;
			return newItem;
		}

		/// <summary>
		/// Creates a shallow copy of this object of all simple properties
		/// </summary>
		public static ObjectAttribute Clone(Tracker.Data.EFDAL.Interfaces.Entity.IObjectAttribute item)
		{
			var newItem = new ObjectAttribute();
			newItem.AttributeName = item.AttributeName;
			newItem.AttributeType = item.AttributeType;
			newItem.ID = item.ID;
			newItem.ObjectName = item.ObjectName;
			return newItem;
		}

		#endregion

		#endregion

	}

}
